namespace Brjnk.CoordinateSystem2D.Layers
{
    using System;
    using System.Collections.Generic;
    using System.Windows.Media;
    using System.Windows.Media.Media3D;

    /// <summary>
    /// </summary>
    public class TestGraphAdapter : GraphDataAdapter
    {
        public override void Initialize(GraphAdapterContext context)
        {
            List<GraphPoint> data1 = new List<GraphPoint>();
            List<GraphPoint> data2 = new List<GraphPoint>();

            Random r = new Random();

            for (int i = 0; i < 10000; i++)
            {
                var p = new Point3D(i * 50 - 100, 100 * ((i) % 2) + 20, i % 2);
                data1.Add(new GraphPoint() { Pos = p, DataObject = i });
                // data1.Add(new GraphPoint() { X = r.Next(0,1000), Y =r.Next(0,01000), Z = r.NextDouble()});
                //   data2.Add(new GraphPoint() { X = i, Y = 2, Z = (i%2)/100.0 });
            }

            //data1.Add(new GraphPoint() { X = 1, Y = 100, Z = 1 });
            //data1.Add(new GraphPoint() { X = 2, Y = 00, Z = 0 });
            //data1.Add(new GraphPoint() { X = 3, Y = 100, Z = 1 });
            //data1.Add(new GraphPoint() { X = 4, Y = 00, Z = 1 });
            //data1.Add(new GraphPoint() { X = 5, Y = 3, Z = 1 });

            context.AddDataSerie("1", "1", data1,
                new GraphDataInfo(0, 100, null),
                new GraphStyle() { Thickness = 1, HighColor = Colors.Red, LowColor = Colors.Blue, UseGradient = true, Highlight = false });         //   context.AddDataSerie("2", data2, new GraphStyle() { Thickness = 1, HighColor = Colors.Red, LowColor = Colors.Blue, UseGradient = false});
            //context.AddDataSerie("2", data1, new GraphStyle() { Thickness = 1, HighColor = Colors.Blue, LowColor = Colors.Red, UseGradient = false, Constant = AxisOrientation.Horizontal });         //   context.AddDataSerie("2", data2, new GraphStyle() { Thickness = 1, HighColor = Colors.Red, LowColor = Colors.Blue, UseGradient = false});
        }

        public override void SetData(object data)
        {
        }
    }
}